<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/tags"
	xmlns:p="http://primefaces.org/ui">

	<h:form styleClass="form-horizontal" id="register_form">
		<div id="registerBox" class="modal hide fade" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">×</button>
				<h3 id="myModalLabel">Création de compte</h3>
			</div>
			<div id="update" class="modal-body">
				<div class="control-group">
					<label class="control-label" for="input_firstName">Prénom</label>
					<div class="controls">
						<h:inputText value="#{C_AUTHOR.firstName}" id="input_firstName" name="input_firstName"
							placeholder="Prénom" />
					</div>
					<br />
					<label class="control-label" for="input_lastName">Nom</label>
					<div class="controls">
						<h:inputText value="#{C_AUTHOR.lastName}" id="input_lastName" name="input_lastName"
							placeholder="Nom" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="input_mail1">Mail</label>
					<div class="controls">
						<h:inputText value="#{C_AUTHOR.mail1}" id="input_mail1" placeholder="Mail" >
							<f:ajax event="blur" listener="#{C_AUTHOR.checkIfExist}" execute="@this" render=":register_form:message_mail1 :register_form:messages"/>
						</h:inputText>
					</div>
					<h:message id="message_mail1" for="input_mail1" showDetail="true" showSummary="false" 
						styleClass="ui-messages-span" warnClass="ui-messages-span-warn"/>
					<br />
					<label class="control-label" for="input_mail2"></label>
					<div class="controls">
						<h:inputText value="#{C_AUTHOR.mail2}" id="input_mail2" name="input_mail2" placeholder="Vérification du Mail" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="input_password1">Mot de passe</label>
					<div class="controls">
						<h:inputSecret value="#{C_AUTHOR.password1}" id="input_password1" name="input_password1" placeholder="Mot de passe" />
					</div>
					<br />
					<label class="control-label" for="input_password2"></label>
					<div class="controls">
						<h:inputSecret value="#{C_AUTHOR.password2}" id="input_password2" name="input_password2" placeholder="Vérification du Mot de passe" />
					</div>
				</div>
				<h:messages id="messages" showDetail="true" showSummary="false" styleClass="ui-messages-ul" warnClass="ui-messages-warn"/>
			</div>
			<div class="modal-footer">
				<h:commandButton styleClass="btn btn-primary" value="Créer" actionListener="#{C_AUTHOR.register}" />
				<button class="btn" data-dismiss="modal" aria-hidden="true">Annuler</button>
			</div>
		</div>
	</h:form>
</ui:composition>
